'''用户输入一个年份，编写程序判断该年份是否是闰年，如果年份能够被400整除，则为闰年；如果年份能被4整除但不能被100整除也为闰年。'''
def getYear():
    inputYear = eval(input('请输入任意一个年份：'))
    if type(inputYear) != type(123):
        inputYear = 0
        EXCEPTION = 1/inputYear
    return inputYear

def judgeYear(inputYear):   
    respond = ''
    if (inputYear%4 == 0) and (inputYear != 0) :
        respond = ''
    elif inputYear%400 == 0:
        respond = ''
    else:
        respond = '不'
    return respond

def main():
    try:
        inputYear = getYear()
    except ZeroDivisionErron:
        print('输入内容必须为整数！')
    except:
        print('输入内容必须为数字！')
    respond = judgeYear(inputYear)
    print('这个年份{}是闰年'.format(respond))

main()
